<template>
	<div class="app-container">
		<div class="adddivs" v-show="adddissshow" v-loading="adddissshow">

		</div>
		<div class="content" ref="leftcontent">
			<div class="content_left" v-if="!adddissshow">
				<div class="scrollcontent">
					<div class="titles" ref="titles_text">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 保单信息
						</p>
						<div class="top_btn">
							 <el-button size="mini" @click="reCompute" style="    padding: 5px;">保单重新计算政策</el-button>
							  <el-button size="mini"  style="    padding: 5px;">重新抓取</el-button>
							<el-button size="mini" class="gobacks" type="info" @click="backs">返回</el-button>
							<el-button size='mini' class="btn_text" @click="deletes" :loading="loading_delete">删除</el-button>
						</div>
					</div>
					<div class="Policy">
						<div class="Policy_top">
							<span class="Policy_top_name">保单号：</span>
							<span class="Policy_top_num">
								{{allData.guaranteeSlipBaseBase.guaranteeSlipNumber}}
							</span>
							<span>
								 <el-button style="padding:1px 5px;margin-left:5px;position:relative;top:1px;" type="info" size="mini" @success="handleSuccess" @error="handleError" v-clipboard="allData.guaranteeSlipBaseBase.guaranteeSlipNumber">复制</el-button>
							</span>
							<span class="Policy_top_types" v-if='allData.guaranteeSlipBaseBase.guaranteeSlipType==1'>商业险
							</span>
							<span class="Policy_top_type2" v-else>交强险</span>
						</div>
						<div class="Policy_conebt">
							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">保险公司：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.insuranceName}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">工&emsp;&emsp;号：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.staffAccount}} （{{allData.guaranteeSlipBaseBase.describe}}）
								</span>
								</p>
								
								<!-- <p class="Policy_conebt_one">
									<span class="Policy_conebt_name">所属机构：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.organizationName}}
								</span>
								</p> -->
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">业务归属：</span>
										
									<el-tooltip class="item" effect="light" placement="top">
										<div slot="content" class=''>
											{{allData.guaranteeSlipBaseBase.chargerOrganizationFullName}}
										</div>
											<span class="companytest">
												
												<el-popover style="z-index:33" placement="right-start" width="430" v-model="usershow" trigger="manual">
										<el-form label-width="80px" :model="userjson" :rules="userrules" ref="userjson">
											<el-form-item label="组织机构" prop="OrganizationUnitId">
												<!--<tree-select class='padlefts' size='mini' :treeData="treeData" :treeProps="treeProps" v-model="userjson.OrganizationUnitId" :multiple="false" placeholder="请选择组织" @setSelectedId="setSelectedId">
		            							</tree-select>-->

												<ztree-select placeholder="请选择组织" @change="setSelectedId" class='padlefts' v-model="userjson.OrganizationUnitId" :multiple="false" :treedata="treedata" :childprops="treeProps"></ztree-select>

											</el-form-item>
											<el-form-item label="业务归属" class='setStyle' prop="businessOrganzationId">
												<el-select v-model="userjson.businessOrganzationId" placeholder="请选择" size="mini" class='padlefts'>
													<el-option style="padding:0 7px;" v-for="item in userlist" 
													:key="item.organzationId"
											      :label="item.organzationName"
											      :value="item.organzationId">
													</el-option>
												</el-select>
											</el-form-item>
											<el-form-item label="业务员" class='setStyle'>
												<el-input v-model="userjson.salesman" placeholder="请选择" size="mini" class='padlefts'></el-input>
											</el-form-item>
											<div class="btns">
												<el-button size="mini" :loading="loading" @click="usersubmits('userjson')">确定</el-button>
												<el-button size="mini" type="info" @click="userClose()">取消</el-button>
											</div>
										</el-form>

									
										<div slot="reference" class="color_text">
											<span class="color_texts">
												{{allData.guaranteeSlipBaseBase.organizationName}}
												 <i class="iconfont icon-bianji" @click="edituser(allData.guaranteeSlipBaseBase)"></i>
											</span>
											
										</div>

										
									</el-popover>
											</span>
									</el-tooltip>
									
									

								</p>
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">业&ensp;务&ensp;员：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.salesman}}
									 <i class="iconfont icon-bianji" @click="edituser(allData.guaranteeSlipBaseBase)"></i>
											
									</span>
								</p>
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">总&ensp;保&ensp;费：</span>
									<span class="Policy_conebt_dir Policy_conebt_money">￥{{allData.guaranteeSlipBaseBase.totalPremium | numFilter}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">总标准保费：</span>
									<span class="Policy_conebt_dir">￥{{allData.guaranteeSlipBaseBase.totalStandardPremium | numFilter}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">总净保费：</span>
									<span class="Policy_conebt_dir Policy_conebt_money">￥{{allData.guaranteeSlipBaseBase.totalNetPremium | numFilter}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">总&ensp;税&ensp;额：</span>
									<span class="Policy_conebt_dir">￥{{allData.guaranteeSlipBaseBase.totalTaxAmount | numFilter}}
								</span>
								</p>

								<p class="Policy_conebt_one" v-if='allData.guaranteeSlipBaseBase.guaranteeSlipType==2'>
									<span class="Policy_conebt_name">车&ensp;船&ensp;税：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.vehicleAndVesselTax | numFilter}}
									
								</span>
								</p>

								<p class="Policy_conebt_one" v-if='allData.guaranteeSlipBaseBase.guaranteeSlipType==2'>
									<span class="Policy_conebt_name">车船税状态：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.taxTypeName}}
									
								</span>
								</p>
							</div>

							<!--2222-->
							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">签单日期：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.signDate}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">核保日期：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.confirmDate}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">支付日期：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.paymentDate}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">起保日期：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.beginDate}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">到期日期：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.expirationDate}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">录入系统日期：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.creationTime}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">单证打印日期：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.documentPrintingDate}}
								</span>
								</p>

								<p class="Policy_conebt_one" v-if='allData.guaranteeSlipBaseBase.guaranteeSlipType==2'>
									<span class="Policy_conebt_name">车船税补缴：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.overPay | numFilter}}
									
								</span>
								</p>

								<p class="Policy_conebt_one" v-if='allData.guaranteeSlipBaseBase.guaranteeSlipType==2'>
									<span class="Policy_conebt_name">车船税滞纳金：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.lateFree | numFilter}}
									
								</span>
								</p>

							</div>

							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">投保单号：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.guaranteeSlipSingleNumber}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">保单印刷号：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.guaranteeSlipPrintingNumber}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">业务类型：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.businessType}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">交商同保：</span>
									<el-popover trigger="manual" placement="bottom-end" width="189" v-model="insuranceshow">
										<div class="insurance_radio">
											<p>交商同保：</p>
											<div class="insurance_radios">
												<el-radio v-model="radios" class="radio_lefdt" :label="item.key" v-for="item in mutualInsurances">{{item.value}}</el-radio>
											</div>
										</div>
										<div class="btns">
											<el-button size="mini" @click="insurancesubmits" :loading="loadings">确定</el-button>
											<el-button size="mini" type="info" @click="insuranceshow= false">取消</el-button>
										</div>
										<div slot="reference" class="color_text">{{allData.guaranteeSlipBaseBase.mutualInsurance}}
											<i class="iconfont icon-bianji" @click="editedituser(allData.guaranteeSlipBaseBase)"></i>
										</div>
									</el-popover>

								</p>
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">上年出险次数：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.dangerTimes}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">上年违章次数：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.peccancyTimes}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name">渠道名称：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.channelName}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name"> 渠道代码：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.channelCode}}
								</span>
								</p>

								<p class="Policy_conebt_one" v-if='allData.guaranteeSlipBaseBase.guaranteeSlipType==2'>
									<span class="Policy_conebt_name"> 标志印刷号：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.markPrintingNumber}}
								</span>
								</p>
							</div>
						</div>
					</div>

				</div>

				<!--2222-->
				<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 车辆信息
						</p>
					</div>
					<div class="Policy">
						<div class="Policy_top">
							<span class="Policy_top_name">车牌号：</span>
							<span class="Policy_top_type Policy_top_car1" v-if="allData.guaranteeSlipBaseBase.plateColor=='蓝'">
								<span>{{allData.guaranteeSlipBaseBase.plateNumber | addtrims}}
								</span>
							</span>
							<span class="Policy_top_type Policy_top_car2" v-else-if="allData.guaranteeSlipBaseBase.plateColor=='黑'">
								<span>{{allData.guaranteeSlipBaseBase.plateNumber | addtrims}}
								</span>
							</span>
							<span class="Policy_top_type Policy_top_car3" v-else-if="allData.guaranteeSlipBaseBase.plateColor=='白'">
								<span>{{allData.guaranteeSlipBaseBase.plateNumber | addtrims}}
								</span>
							</span>
							<span class="Policy_top_type Policy_top_car4" v-else-if="allData.guaranteeSlipBaseBase.plateColor=='绿'">
								<span>{{allData.guaranteeSlipBaseBase.plateNumber | addtrims}}
								</span>
							</span>
							<span class="Policy_top_type Policy_top_car5" v-else-if="allData.guaranteeSlipBaseBase.plateColor=='黄'">
								<span>{{allData.guaranteeSlipBaseBase.plateNumber | addtrims}}
								</span>
							</span>
							<span class="Policy_top_type Policy_top_car" v-else>
								<span>{{allData.guaranteeSlipBaseBase.plateNumber | addtrims}}
								</span>
							</span>
						</div>
						<div class="Policy_conebt">
							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">车辆种类：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.vehicleType}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">号牌底色：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.plateColor}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">车&ensp;架&ensp;号：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.frameNumber}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">发动机号：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.engineNumber}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">座&emsp;&emsp;位：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.seatCount}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">是否新车：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.isNew}}
								</span>
								</p>
							</div>

							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">采&ensp;购&ensp;价：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.purchasePrice | numFilter}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">核载质量：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.loadQuality}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">整备质量：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.curbQuality}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">功&emsp;&emsp;率：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.power}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">排&emsp;&emsp;量：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.displacement}}
								</span>
								</p>
							</div>
							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">厂牌型号：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.brandModel}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">是否过户车：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.isTransfer}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">所属性质：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.belongNature}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">使用性质：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.useNature}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">初登日期：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.initialDate | times}}
								</span>
								</p>
							</div>

						</div>
					</div>

				</div>

				<!--3333-->
				<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 保单关系人
						</p>
					</div>
					<div class="Policy Policy_user Policy_arr">
						<template v-for="(item,index) in allData.relations">
							<div class="Policy_top">
								<span class="Policy_top_name">
									<span>{{item.str}} </span>
									
								</span>

							</div>
							<div class="Policy_conebt Policy_conebt_bom">
								<div class="Policy_conebt_left">
									<p class="Policy_conebt_one">
										<span class="Policy_conebt_name Policy_top_smallname">客户姓名：</span>
										<span class="Policy_conebt_dir">{{item.customerName}}
										</span>
									</p>

									<p class="Policy_conebt_one">
										<span class="Policy_conebt_name Policy_top_smallname">证件类型：</span>
										<span class="Policy_conebt_dir">{{item.certificateType}}
								</span>
									</p>

									<p class="Policy_conebt_one">
										<span class="Policy_conebt_name Policy_top_smallname">客户类型：</span>
										<span class="Policy_conebt_dir" v-if="item.customerType==0">个人客户</span>
										<span class="Policy_conebt_dir" v-else-if="item.customerType==1">集体客户</span>
										<span class="Policy_conebt_dir" v-else>-</span>
									</p>

								</div>

								<div class="Policy_conebt_left">
									<p class="Policy_conebt_one">
										<span class="Policy_conebt_name Policy_top_smallname">性&emsp;&emsp;别：</span>
										<span class="Policy_conebt_dir" v-if="item.gender==0">男</span>
										<span class="Policy_conebt_dir" v-else-if="item.gender==1">女</span>
										<span class="Policy_conebt_dir" v-else>-</span>
									</p>

									<p class="Policy_conebt_one">
										<span class="Policy_conebt_name Policy_top_smallname">证&ensp;件&ensp;号：</span>
										<span class="Policy_conebt_dir">{{item.identificationNumber}}
								</span>
									</p>

									<p class="Policy_conebt_one">
										<span class="Policy_conebt_name Policy_top_smallname">地&emsp;&emsp;址：</span>
										<span class="Policy_conebt_dir">{{item.address}}
								</span>
									</p>
								</div>
								<div class="Policy_conebt_left">
									<p class="Policy_conebt_one">
										<span class="Policy_conebt_name Policy_top_smallname">手&ensp;机&ensp;号：</span>
										<span class="Policy_conebt_dir">{{item.customerPhone}}
								</span>
									</p>

									<p class="Policy_conebt_one">
										<span class="Policy_conebt_name Policy_top_smallname">座&ensp;机&ensp;号：</span>
										<span class="Policy_conebt_dir">{{item.telphone}}
								</span>
									</p>
								</div>

							</div>
							<div class="jiange" v-if="index!=allData.relations.length-1">

							</div>
						</template>

					</div>

				</div>

				<!--4444-->
				<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 保单明细
						</p>
					</div>
					<div class="Policy Policy_arr Policy_boms">
						<div class="Policy_table Policycar">
							<div class="Policy_table_bor">
								<div class="Policy_table_top Policy_table_tops">
									<p class="Policy_table_one">项目</p>
									<p class="Policy_table_two Policy_table_twos">保额</p>
									<p class="Policy_table_three Policy_table_twos">保单保费</p>
									<p class="Policy_table_four Policy_table_twos">折扣</p>
								</div>
								<template v-if="allData.details" v-for="item in allData.details">
									<span class="Policy_details_name">
									<i class="iconfont icon-xuanzhong"></i>{{item.kindname}}
								</span>
									<div class="Policy_table_top" v-for="val in item.slipDetails">
										<p class="Policy_table_one">{{val.item}}</p>
										<p class="Policy_table_two Policy_table_twos">{{val.coverage | numFilter}}</p>
										<p class="Policy_table_three Policy_table_twos">{{val.premium | numFilter}}</p>
										<p class="Policy_table_four Policy_table_twos">{{val.discount}}</p>
									</div>
								</template>
								<div v-else class="nodata">
									暂无数据
								</div>
							</div>

						</div>
					</div>

				</div>

				<!--11 v-if="allData.extends"-->
				<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 扩展信息
						</p>
					</div>
					<div class="Policy Policy_extends">
						<div class="extends" v-if="allData.guaranteeSlipBaseBase.extends!='-'">
							<div class="extends_one" v-for="val in allData.guaranteeSlipBaseBase.extends">
								<p class="Policy_extends_one">{{val.displayName}}</p>
								<p class="Policy_table_two">{{val.value}}</p>
							</div>
						</div>
						<div class="nodata" v-else>
							暂无数据
						</div>
					</div>

				</div>

					<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 代理信息
						</p>
					</div>
					<div class="Policy">
						<div class="Policy_top">
							<span class="Policy_top_name">出单机构：</span>
							<span class="Policy_top_num">
								<span>{{allData.guaranteeSlipBaseBase.dealInstitution}}
								</span>
							</span>
						</div>
						<div class="Policy_conebt">
							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">归属机构：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.belongToInstitution}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">归&ensp;属&ensp;人：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.belonger}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">经&ensp;办&ensp;人：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.agent}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">业务来源：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.businessSources}}
								</span>
								</p>

							</div>

							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">验&ensp;车&ensp;人：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.carChecker}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">子协议代码：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.subProtocolCode}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">争议处理：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.disputeSettlement}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">报&ensp;批&ensp;号：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.batchNumber}}
								</span>
								</p>

								
							</div>
							<div class="Policy_conebt_left">
								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">报批名称：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.batchName}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">渠道类型：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.channelTypeName}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">仲裁机构：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.arbitrationInstitution}}
								</span>
								</p>

								<p class="Policy_conebt_one">
									<span class="Policy_conebt_name Policy_top_smallname">推荐修送点：</span>
									<span class="Policy_conebt_dir">{{allData.guaranteeSlipBaseBase.recommendedRepairPoint}}
								</span>
								</p>
	
							</div>

						</div>
					</div>

				</div>

				
				<!--555  v-if="allData.guaranteeSlipCharge.companyCharge"-->
				<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 手续费信息
						</p>
					</div>
					<div class="Policy">
						<div class="Service">
							<div class="Serviceinof">
								<div class="Service_top">
									<p class="Service_top_one">费用名称</p>
									<p class="Service_top_two">比例</p>
									<p class="Service_top_three">金额</p>
									<p class="Service_top_four">政策批次</p>
									<p class="Service_top_five">批次条目</p>
								</div>
								<div class="Service_content" v-if="allData.fees">
									<template v-for="item in allData.fees">
										<p class="Service_content_name" v-if="item.organizationName">{{item.organizationName}}</p>

										<div class="Service_information" v-for="val in item.guaranteeSlipFeeList">
											<p class="Service_top_one"><span>{{val.feeName}}</span></p>
											<p class="Service_top_two"><span>{{val.chargeRatio | tofixeds}}%</span></p>
											<p class="Service_top_three"><span>{{val.charge | numFilter}}</span></p>
											<p class="Service_top_four Service_top_cursor">
												<!--<span @click="jumpTo(val.policyBatchId,val.isUpperPolicyBatch)">
													{{val.batchName}}
												</span>-->
												<span v-if="val.isUpperPolicyBatch==0">
													<router-link :to="{name:'policyupper3c_list',query:{batchId:val.policyBatchId}}">
														{{val.batchName}}
													</router-link>
												</span>
												<span v-else>
													<router-link :to="{name:'policylower3_list',query:{batchId:val.policyBatchId}}">
														{{val.batchName}}
													</router-link>
												</span>
											</p>
											<p class="Service_top_five Service_top_cursor">
												<!--<span @click="jumpTo1(val.policyBatchId,val.policyId,val.state,val.isUpperPolicyBatch)">
													{{val.remark}}
												</span>-->
												<span v-if="val.isUpperPolicyBatch==0">
													<router-link :to="{name:'up_policyupedit',query:{batchId:val.policyBatchId,policyId:val.policyId,status:val.state,stream:1}}">
														{{val.remark}}
													</router-link>
												</span>
												<span v-else>
													<router-link  :to="{name:'down_policydowninfo',query:{batchId:val.policyBatchId,policyId:val.policyId,status:val.state,stream:1}}">
														{{val.remark}}
													</router-link>
												</span>
											</p>
										</div>
									</template>
								</div>
								<div v-else class="nodata">
									暂无匹配政策
								</div>
							</div>
						</div>

					</div>
				</div>

				<!--7777   v-if="allData.settlements"-->
				<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 结算信息
						</p>
					</div>
					<div class="Policy">
						<div class="Service">
							<div class="Serviceinof">
								<div class="Service_top">
									<p class="Settlement_top_one">组织机构名称</p>
									<p class="Settlement_top_two">保单手续费</p>
									<p class="Settlement_top_three">车船税手续费</p>
									<p class="Settlement_top_four">附加奖励</p>
									<p class="Settlement_top_five">实结合计</p>
								</div>

								<div class="Service_content"  v-if="allData.settlements">
									<template v-for="item in allData.settlements">
										<div class="Service_information">
											<p class="Settlement_top_one"><span>{{item.organizationName}}</span></p>
											<p class="Settlement_top_two"><span>{{item.aPoundage | numFilter}}</span></p>
											<p class="Settlement_top_three"><span>{{item.aVehicleAndVesselTax | numFilter}}</span></p>
											<p class="Settlement_top_four"><span>{{item.aAdditionalReward | numFilter}}</span></p>
											<p class="Settlement_top_five"><span>{{item.aTotalReward | numFilter}}</span></p>
										</div>
									</template>
								</div>
								<div v-else class="nodata">
									暂无结算信息
								</div>
							</div>

						</div>

					</div>
				</div>

				<!--12-->
				<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 备注信息
						</p>
						<el-popover trigger="manual" placement="bottom-end" width="360" v-model="remarkshow">
							<p class="remark_title">添加备注
								<i class="iconfont icon-close" @click="remarkshow= false"></i>
							</p>
							<el-input class="remark_text" type="textarea" :rows="2" placeholder="请输入内容" v-model="addremarks">
							</el-input>
							<el-checkbox class="remark_chose" v-model="isopen">是否公开显示备注信息</el-checkbox>
							<div class="btns">
								<el-button size="mini" :loading="remark_loading" @click="subremarks">确定</el-button>
								<el-button size="mini" type="info" @click="remarkshow= false">取消</el-button>
							</div>
							<p slot="reference" class="addremarks" >
								<span @click="addmarks">添加备注</span>
							</p>
						</el-popover>

					</div>

					<div class="Policy scrollcontent_padtops">
						<div class="remarks" v-if="allData.guaranteeSlipRemark">
							<div class="remarks_content">
								<p class="remarks_line" v-if="allData.guaranteeSlipRemark.length!=1">
									<span></span>
								</p>
								<p class="remarks_text" v-for="item in allData.guaranteeSlipRemark">
									<span class="queyua"></span>
									<span class="zhehan">
									{{item.remark}} &nbsp;{{item.creationTime}}</span>

								</p>
							</div>

						</div>
						<div v-else class="nodata">
							暂无数据
						</div>
					</div>
				</div>

				<!--13-->
				<div class="scrollcontent">
					<div class="titles">
						<p class="title_name">
							<i class="iconfont icon-baoxianchanpin"></i> 日志记录
						</p>
					</div>
					<div class="Policy scrollcontent_padtops">
						<div class="remarks" v-if="allData.logs">
							<div class="remarks_content">
								<p class="remarks_line" v-if="allData.logs.length!=1">
									<span></span>
								</p>
								<p class="remarks_text" v-for="item in allData.logs">
									<span class="queyua"></span><span class="zhehan">
								{{item.creatorUser}} &nbsp;{{item.creationTime}} &nbsp;{{item.operationDetail}}
									</span>

								</p>
							</div>

						</div>
						<div v-else class="nodata">
							暂无数据
						</div>
					</div>
				</div>

			</div>

			<div class="content_right" v-if="navlist.length!=0&&!adddissshow" ref="navright">
				<ul>
					<li v-for="(item,index) in navlist" :class="item.isactive?'actives':''" @click="go(index)">
						<span>{{item.name}}</span>
					</li>
				</ul>

			</div>

		</div>

	</div>
</template>

<script>
	import Vue from 'vue'
	import ztreeSelect from "@/components/z-select/index.vue";
	import VueClipboards from 'vue-clipboards';
 
	Vue.use(VueClipboards);
	export default {
		data() {
			return {
				adddissshow: true,
				loading: true,
				allData: {},
				dataId: "",
				navlist: [{
						name: "保单信息",
						isactive: true
					},
					{
						name: " 车辆信息",
						isactive: false
					},
					{
						name: "保单关系人",
						isactive: false
					},
					{
						name: "保单明细",
						isactive: false
					},
					{
						name: "扩展信息",
						isactive: false
					},
					{
						name: "代理信息",
						isactive: false
					},
					{
						name: "手续费信息",
						isactive: false
					},
					{
						name: "结算信息",
						isactive: false
					},
					{
						name: " 备注信息",
						isactive: false
					},
					{
						name: "日志记录",
						isactive: false
					},
				],
				dialogFormVisible: false,
				formLabel: {
					mutualInsurance: '',
					name: null,
					remark: '',
					remarkType: '1'
				},
				mutualInsurances: [], //交商同保数据
				names: [], //业务员数据
				remark: '',
				fullWidth: document.documentElement.clientWidth,
				timer: true,
				usershow: false,
				userjson: {},
				userrules: {
					OrganizationUnitId: [{
						required: true,
						message: '请选择组织机构',
						trigger: 'change'
					}],
					businessOrganzationId: [{
						required: true,
						message: '请选择业务归属',
						trigger: 'change'
					}],
				},
				treeProps: {
					name: "displayName", //显示名字
					children: "orgs", //子级字段名
					lv: "depth" //当前层级
				}, //树属性
				treedata: [], //树数据
				userlist: [], //业务员数据
				insurance: {},
				insuranceshow: false,
				radios: '1',
				remarkshow: false,
				isopen: true,
				addremarks: "",
				loading: false,
				loadings: false,
				remark_loading: false,
				loading_delete: false
			}
		},
		components: {
			ztreeSelect
		},
		mounted() {
			
			this.getUnits()
			this.getD()
			var that = this
			if(this.$route.params.id) {
				this.dataId = this.$route.params.id; //"FB72EB42-DF4E-43EE-95A9-2F001B41FB4C" 
				this.getbasic()
				
				let promises = [this.relationshipuser(), this.getPolicy(), this.ServiceCharge(), this.Policysettlement(), this.getremarks(), this.Journal()]
				var aa = document.getElementsByClassName("scrollcontent")
				window.onscroll = function() {
					//变量scrollTop是滚动条滚动时，距离顶部的距离
					var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
					//变量windowHeight是可视区的高度
					var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
					//变量scrollHeight是滚动条的总高度
					var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
					//滚动条到底部的条件
					if(scrollTop + windowHeight >= scrollHeight) {
						for(let j = 0; j < that.navlist.length; j++) {
							if(that.navlist.length - 1 == j) {
								Vue.set(that.navlist[j], 'isactive', true)
							} else {
								Vue.set(that.navlist[j], 'isactive', false)
							}
						}

					} else {
						let scrolltops = document.documentElement.scrollTop
						for(let i = 0; i < aa.length; i++) {
							if(aa[i].offsetTop + 80 <= scrolltops && scrolltops <= aa[i + 1].offsetTop + 80) {
								for(let j = 0; j < that.navlist.length; j++) {
									if(i == j) {
										Vue.set(that.navlist[j], 'isactive', true)
									} else {
										Vue.set(that.navlist[j], 'isactive', false)
									}
								}
								return false
							}

						}
					}

				}
				setTimeout(()=>{
					for(let j = 0; j < that.navlist.length; j++) {
							if(j== 0) {
								Vue.set(that.navlist[j], 'isactive', true)
							} else {
								Vue.set(that.navlist[j], 'isactive', false)
							}
							console.log(88888888888888)
						}
				},100)
				Promise.all(promises).then(function() {
					//that.navlist=[]
					setTimeout(function() {
						//							for(var i = 0; i < aa.length; i++) {
						//							if(i == 0) {
						//								that.navlist.push({
						//									name: aa[i].getElementsByClassName("title_name")[0].innerText,
						//									isactive: true
						//								})
						//							} else {
						//								that.navlist.push({
						//									name: aa[i].getElementsByClassName("title_name")[0].innerText,
						//									isactive: false
						//								})
						//							}
						//						}
						window.onresize = function() {
							var scrollwidth = document.documentElement.scrollWidth || document.body.scrollWidth;
							var winwidth = document.body.clientWidth || document.documentElement.clientWidth
							if(winwidth == scrollwidth) {
								that.$refs.navright.style.display = "block"
								that.$refs.leftcontent.style.padding = "0 150px 0 20px"
							} else {
								that.$refs.navright.style.display = "none"
								that.$refs.leftcontent.style.padding = "0 30px 0 20px"
							}
						}

					}, 0)
				})

			}
		},
		filters: {
			tofixeds(val){
				 val=val*100
				return val.toFixed(2)
			},
			times(val) {
				return val.split(" ")[0]
			},
			addtrims(val) {
				if(val == "未上牌") {
					return val
				} else {
					let str1 = val.slice(0, 2)
					let str2 = val.slice(2, val.length)
					return str1 + " " + str2
				}
			},
			numFilter(val) {
				// 截取当前数据到小数点后两位
				// let realVal = Number(val).toFixed(2)
				// num.toFixed(2)获取的是字符串
				// return Number(realVal)
				if((val || val == 0)&&val!="-") {
					val = val.toString().replace(/\$|\,/g, '');
					if(isNaN(val)) {
						val = "0";
					}
					let sign = (val == (val = Math.abs(val)));
					val = Math.floor(val * 100 + 0.50000000001);
					let cents = val % 100;
					val = Math.floor(val / 100).toString();
					if(cents < 10) {
						cents = "0" + cents
					}
					for(var i = 0; i < Math.floor((val.length - (1 + i)) / 3); i++) {
						val = val.substring(0, val.length - (4 * i + 3)) + ',' + val.substring(val.length - (4 * i + 3));
					}

					return(((sign) ? '' : '-') + val + '.' + cents);
				}else{
					return '-'
				}
			}

		},
		methods: {
			handleSuccess(){
				this.$message({
				message: '复制成功',
				type: 'success'
				});
			},
			handleError(){
				this.$message.error('复制失败');
			},
			//获取基本信息和车辆信息
			getbasic() {
				var that = this

				let params = {
					id: that.dataId
				}
				that.post(params, 'services/app/guaranteeSlip/GuaranteeSlipDetail_Basics').then(rs => {
					if(rs.success) {
						console.log("shuju")
						console.log(rs)
						this.adddissshow = false
						this.loading = false
						this.loadings = false
						Vue.set(that.allData, "guaranteeSlipBaseBase", rs.result)
						console.log("-----------7777777777777777777")
						console.log(rs.result)
						Vue.set(that.userjson, 'OrganizationUnitId', that.allData.guaranteeSlipBaseBase.parentId)
						//guaranteeSlipBaseBase.salesman
						
						for(let k in that.allData.guaranteeSlipBaseBase) {
							if(that.allData.guaranteeSlipBaseBase[k] === null || that.allData.guaranteeSlipBaseBase[k] === "") {
								Vue.set(that.allData.guaranteeSlipBaseBase, k, "-")
							}
						}
						console.log("-------------------------111111111111111111")
						console.log(that.allData.guaranteeSlipBaseBase.extends)
						if(that.allData.guaranteeSlipBaseBase.extends != "-") {
							for(let i = 0; i < that.allData.guaranteeSlipBaseBase.extends.length; i++) {
								for(let k in that.allData.guaranteeSlipBaseBase.extends[i]) {
									if(that.allData.guaranteeSlipBaseBase.extends[i][k] === null || that.allData.guaranteeSlipBaseBase.extends[i][k] === "") {
										Vue.set(that.allData.guaranteeSlipBaseBase.extends[i], k, "-")
									}
								}
							}
						}
					Vue.set(that.userjson, 'salesman', that.allData.guaranteeSlipBaseBase.salesman)
					}
				})

			},
			//保单关系人
			relationshipuser() {
				var that = this
				return new Promise(function(reslove, reject) {
					let params = {
						id: that.dataId
					}
					that.post(params, "services/app/guaranteeSlip/GuaranteeSlipDetail_Relation").then(res => {
						if(res.success) {
							console.log("--9998888888888888888")
							console.log(res)
							let obj=res.result.relations
							let str="";
							let arr=[];
							if(obj) {
								for(let i = 0; i < obj.length; i++) {
									arr=[]
									if(obj[i].isApplicant){
										arr.push('投保人')
									}
									if(obj[i].isCarOwner){
										arr.push('车主')
									}
									if(obj[i].isInsurant){
										arr.push('被保人')
									}
									 str=arr.join("、")
									obj[i].str=str
									//obj[i].str=str
									for(let k in obj[i]) {
										if(obj[i][k] === null || obj[i][k] === "") {
											Vue.set(obj[i], k, "-")
										}
									}
								}
							}
							//that.allData.relations=obj
							Vue.set(that.allData, "relations", obj)
							reslove()
						}
					})
				})

			},
			//手续费信息数据
			ServiceCharge() {
				var that = this
				return new Promise(function(reslove, reject) {
					let params = {
						id: that.dataId
					}
					that.post(params, "services/app/guaranteeSlip/GuaranteeSlipDetail_Fees").then(res => {
						if(res.success) {
							console.log("shuxufei")
							console.log(res)
							Vue.set(that.allData, "fees", res.result.fees)
							if(that.allData.fees) {
								for(let i = 0; i < that.allData.fees.length; i++) {
									for(let k = 0; k < that.allData.fees[i].guaranteeSlipFeeList.length; k++) {
										for(var j in that.allData.fees[i].guaranteeSlipFeeList[k]) {
											if(that.allData.fees[i].guaranteeSlipFeeList[k][j] === null || that.allData.fees[i].guaranteeSlipFeeList[k][j] === "") {
												Vue.set(that.allData.fees[i].guaranteeSlipFeeList[k], j, "-")
											}
										}
									}
								}
							}
							reslove()
						}
					})
				})

			},
			//保单结算数据
			Policysettlement() {
				var that = this
				return new Promise(function(reslove, reject) {
					let params = {
						id: that.dataId
					}
					that.post(params, "services/app/guaranteeSlip/GuaranteeSlipDetail_Settlements").then(res => {
						if(res.success) {
							console.log(1111111111111)
							console.log(res.result.settlements)
							let aa=res.result.settlements
							for(let i=0;i<aa.length;i++){
								for(let k in aa[i]){
									if(aa[i][k]===null||aa[i][k]==""){
										aa[i][k]="-"
									}
								}
							}
							
							Vue.set(that.allData, "settlements", aa)
							reslove()
						}
					})
				})

			},
			//获取保单明细
			getPolicy() {
				var that = this
				return new Promise(function(reslove, reject) {
					let params = {
						id: that.dataId
					}
					that.post(params, "services/app/guaranteeSlip/GuaranteeSlipDetail_Details").then(res => {
						if(res.success) {

							//slipDetails
							Vue.set(that.allData, "details", res.result.details)
							Vue.set(that,"usershow",res.result.organizationUnitId)
							if(that.allData.details) {
								for(let i = 0; i < that.allData.details.length; i++) {
									for(let j = 0; j < that.allData.details[i].slipDetails.length; j++) {
										for(let k in that.allData.details[i].slipDetails[j]) {
											if(that.allData.details[i].slipDetails[j][k] === null || that.allData.details[i].slipDetails[j][k] === "") {
												Vue.set(that.allData.details[i].slipDetails[j], k, "-")
											}
										}
									}

								}
							}

							reslove()
						}
					})
				})
			},
			//备注信息
			getremarks() {
				var that = this
				return new Promise(function(reslove, reject) {
					let params = {
						id: that.dataId
					}
					that.post(params, "services/app/guaranteeSlip/GuaranteeSlipDetail_Remark").then(res => {
						if(res.success) {

							that.remark_loading = false

							Vue.set(that.allData, "guaranteeSlipRemark", res.result.guaranteeSlipRemark)
							reslove()
						}
					})
				})

			},
			//重新计算政策
			reCompute(){
					var that = this
					let params = {
						id: that.dataId
					}
					that.post(params, "services/app/guaranteeSlip/GuaranteeSlipDetail_Remark").then(res => {
						if(res.success) {
							 this.$notify({
								title: "成功",
								type: "success",
								message: "开始重新计算政策",
								customClass: "el-notification-success"
							});
						}
					})
			},
			//日志数据
			Journal() {
				var that = this
				return new Promise(function(reslove, reject) {
					let params = {
						id: that.dataId
					}
					that.post(params, "services/app/guaranteeSlip/GuaranteeSlipDetail_Log").then(res => {
						if(res.success) {

							that.remark_loading = false
							Vue.set(that.allData, "logs", res.result.logs)
							reslove()
						}
					})
				})

			},

			//添加备注
			addmarks() {
				this.remarkshow = true
				this.addremarks = ""
				this.isopen = true
			},
			//提交备注
			subremarks() {
				//this.dataId

				this.remark_loading = true
				if(this.addremarks.trim()) {
					let params = {
						id: this.dataId,
						remark: this.addremarks,
						remarkType: this.isopen ? 1 : 2
					};
					this.post(params, "services/app/guaranteeSlip/UpdateGuaranteeSlipRemark").then(
						rs => {

							if(rs.success) {

								this.getremarks()
								this.Journal()
							}
						}
					);
				}

				this.remarkshow = false
			},
			//业务员提交
			usersubmits(formName) {
				//this.dataId
				this.loading = true
				this.$refs[formName].validate((valid) => {
					if(valid) {

						let params = {
							id: this.dataId,
							businessOrganzationId: this.userjson.businessOrganzationId,
							salesman:this.userjson.salesman
						};
						this.post(params, "services/app/guaranteeSlip/UpdateGuaranteeSlipBusinessOrg").then(
							rs => {

								if(rs.success) {
									 this.$notify({
										title: "成功",
										type: "success",
										message: "修改业务所属成功",
										customClass: "el-notification-success"
									});
									this.getbasic()
									this.Journal()
									this.getremarks()
									this.usershow = false
									this.loading = false
								}else{
									console.log(1)
									this.$notify.error({
										title: "错误",
										message: rs.error.message
									});
									this.loading = false
									this.userClose()
								}
							}
						);
					} else {
						return false
					}
				})
				//this.usershow=false
			},
			//编辑叫上同胞
			editedituser(val) {
				this.insuranceshow = true

				this.radios = val.insuranceType
			},
			//业务类型提交
			insurancesubmits() {
				//this.dataId

				this.loadings = true
				this.insuranceshow = false
				let params = {
					id: this.dataId,
					insuranceType: this.radios
				};
				this.post(params, "services/app/guaranteeSlip/UpdateGuaranteeSlipInsuranceType").then(
					rs => {

						if(rs.success) {
							this.loadings = false
							this.getbasic()
							this.Journal()
							this.getremarks()
						}else{
							this.loadings = false
						}
					}
				);
			},
			//组织机构
			getUnits() {
				let params = {};
				this.post(params, "services/app/common/GetCurrentOrganizationUnits").then(
					rs => {

						if(rs.success) {
							let data = rs.result;
							let arr = [];
							arr.push(data);
							this.treedata = arr;
							
						}
					}
				);
			},
			setSelectedId(val) {

				if(val != "") {
					Vue.set(this.userjson, 'OrganizationUnitId', val)
					Vue.set(this.userjson, 'businessOrganzationId', "")
					this.getUsers(val)
				} else {
					this.userjson.OrganizationUnitId = ""
					Vue.set(this.userjson, 'businessOrganzationId', "")
					this.userlist = [];
				}

			},
			 getUsers(val){

	      		let params = {
							 organzationId: val
	      		};
		      	this.post(params, "services/app/common/CurrentBusinessAscription").then(rs => {
							
			        if (rs.success) {
			          let result = rs.result.items;
								this.userlist = result;
								  // this.formLabel.UserId=rs.result.items[0].organzationId
			        }
			      });
				},
			//编辑业务员
			edituser(val) {
				//userId 
				this.usershow = true
				console.log(val.parentId)
				var that = this

				// var str = val.chargerOrganizationFullName;
				// var strs=str.split("-"); //字符分割 

				// 

				// Vue.set(this.userjson, 'OrganizationUnitId', val.parentId)
				that.getUsers(val.organizationUnitId)
				Vue.set(that.userjson, 'businessOrganzationId', val.organizationUnitId)
				
				
		
				
				//				new Promise(function(reslove,reject){
				//					Vue.set(that.userjson,'OrganizationUnitId',val.organizationUnitId)
				//					reslove()
				//				}).then(function(){
				//					setTimeout(function(){
				//						Vue.set(that.userjson,'UserId',val.userId)
				//					},500)
				//					
				//				})
			},
			//返回
			backs() {
				this.$router.go(-1)
			},
			userClose(){
				this.usershow = false
				this.getbasic()
			},
			//删除
			deletes() {
				let params = {
					id: this.dataId
				}

				this.$confirm('确认删除吗?', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					this.loading_delete = true
					this.post(params, 'services/app/guaranteeSlip/DeteteGuaranteeSlip').then(rs => {
						if(rs.success) {
							this.loading_delete = false
							this.$notify({
								title: '删除成功',
								message: '您已成功删除一条保单',
								type: 'success',
								customClass: "el-notification-success"
							});
							this.$router.push({
								name: "policyquery"
							})
						} else {
							this.loading_delete = false
							this.$notify.error({
								title: '错误',
								message: res.error.message
							});
						}
					})
				}).catch(() => {
					this.$message({
						type: 'info',
						message: '已取消删除'
					});
				});

			},

			//交商同保
			getD() {
				let params = {
					id: 101
				};
				this.post(params, 'services/app/common/GetDictionaries').then(rs => {
					if(rs.success) {

						this.mutualInsurances = rs.result.items;
					}
				})
			},
			go(e) {
				var that = this
				let aa = document.getElementsByClassName("scrollcontent")[e].offsetTop
				window.scrollTo(0, aa + 80);
				setTimeout(function() {
					for(let j = 0; j < that.navlist.length; j++) {
						if(e == j) {
							Vue.set(that.navlist[j], 'isactive', true)
						} else {
							Vue.set(that.navlist[j], 'isactive', false)
						}
					}
				}, 0)

			},
			// 跳转
			jumpTo(id,isUp){
				if(isUp == 0){
					// 上游
					this.$router.push({
						name:'policyupper3c_list',
						query:{
							batchId:id
						}
					})
				}else{
					this.$router.push({
						name:'policylower3_list',
						query:{
							batchId:id
						}
					})
				}
			},
			jumpTo1(batchid,policyid,state,isUp){
				if(isUp == 0){
					// 上游
					this.$router.push({
						name:'up_policyupedit',
						query:{
							batchId:batchid,
							policyId:policyid,
							status:state,
							stream:1
						}
					})
				}else{
					this.$router.push({
						name:'down_policydowninfo',
						query:{
							batchId:batchid,
							policyId:policyid,
							status:state,
							stream:2
						}
					})
				}
			},
			
		}
	}
</script>

<style lang='scss' scoped>
	* {
		margin: 0;
		padding: 0;
	}
	
	.app-container {
		margin: 20px 20px 0px 20px;
	}
	
	.content {
		width: 100%;
		padding: 0 150px 0 20px;
		position: relative;
		display: flex;
		background: #ffffff;
	}
	
	.content_left {
		width: 100%;
		background: #ffffff;
		padding-bottom: 30px;
		.titles {
			width: 100%;
			height: 85px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			background: #FFFFFF;
			.title_name {
				font-size: 18px;
				color: #333333;
				i {
					color: #FF7819;
					margin-right: 15px;
				}
			}
			.top_btn {
				display: flex;
				align-items: center;
				.gobacks {
					width: 75px;
					height: 28px;
				}
				.btn_text {
					width: 75px;
					height: 28px;
					background: #FF7819;
					border-radius: 5px;
					display: flex;
					align-items: center;
					justify-content: center;
					font-size: 13px;
					color: #FFFFFF;
					margin-left: 16px;
					cursor: pointer;
					i {
						font-size: 11px;
						margin-right: 8px;
					}
				}
			}
		}
		.Policy {
			width: 100%;
			box-sizing: border-box;
			background: #FFFFFF;
			box-shadow: -1px -1px 4px 0 rgba(0, 0, 0, 0.20), 1px 1px 4px 0 rgba(0, 0, 0, 0.20);
			border-radius: 5px;
			margin-bottom: 2px;
			padding: 0 0 30px 0;
			.Policy_top {
				width: 100%;
				height: 59px;
				border-bottom: 1px solid rgba(0, 0, 0, 0.2);
				display: flex;
				justify-content: flex-start;
				align-items: center;
				background: #ffffff;
				.Policy_top_name {
					font-size: 16px;
					color: #333333;
					margin-left: 30px;
					i {
						color: #027DCA;
						margin-right: 14px;
					}
				}
				.Policy_top_num {
					font-size: 17px;
					color: #0F62C2;
					margin-left: 10px;
				}
				.Policy_top_types {
					display: block;
					padding: 6px;
					background:   #39b96c;
					border-radius: 3px;
					margin-left: 15px;
					font-size: 11px;
					color: #FFFFFF;
				}
				.Policy_top_type2{
					display: block;
					padding: 6px;
					background:#3c8cbd;
					border-radius: 3px;
					margin-left: 15px;
					font-size: 11px;
					color: #FFFFFF;
				}
				.Policy_top_type {
					min-width: 95px;
					padding: 6px 12px;
					background-color: #0f62c2;
					border-radius: 5px;
					margin-left: 15px;
					border: 1px solid rgba(15, 98, 194, 0.50);
					box-shadow: 0 0 4px #fff inset;
					font-size: 13px;
					color: #FFFFFF;
					height: 30px;
					display: flex;
					justify-content: center;
					align-items: center;
				}
				.Policy_top_car {
					background: #0F62C2;
					color: white;
				}
				.Policy_top_car1 {
					background: #0F62C2;
					color: white;
				}
				.Policy_top_car2 {
					background: black;
					color: white;
				}
				.Policy_top_car3 {
					background: white;
					color: black;
				}
				.Policy_top_car4 {
					background: -webkit-linear-gradient(#dae6e2, #059067);
					/* Safari 5.1 - 6.0 */
					background: -o-linear-gradient(#dae6e2, #059067);
					/* Opera 11.1 - 12.0 */
					background: -moz-linear-gradient(#dae6e2, #059067);
					/* Firefox 3.6 - 15 */
					background: linear-gradient(#dae6e2, #059067);
					/* 标准的语法 */
					color: white;
				}
				.Policy_top_car5 {
					background: #ffd202;
					color: black;
				}
			}
			.Policy_top_nobor {
				border: 0;
			}
			.Policy_conebt {
				width: 100%;
				display: flex;
				justify-content: space-between;
				padding: 0 30px;
				background: #ffffff;
				.Policy_conebt_left {
					display: flex;
					flex-direction: column;
					width: 32%;
					.Policy_conebt_one {
						display: flex;
						justify-content: flex-start;
						margin-top: 14px;
						width: 100%;
						.Policy_conebt_name {
							min-width: 91px;
							font-size: 13px;
							color: #666666;
							display: block;
							line-height: 18px;	
						}
						.Policy_top_smallname{
							width:78px;
							min-width: 78px;
						}
						.Policy_conebt_dir {
							display: block;
							line-height: 18px;
							width: calc( 100% - 91px);
							font-size: 13px;
							color: #333333;
							word-break: break-all;
						}
						.Policy_conebt_money {
							color: #0F62C2;
							font-weight: 600;
						}
					}
					/*.Policy_conebt_one:not(:last-of-type){
						margin-bottom:12px;
					}*/
				}
				.Policy_conebt_left:not(:last-of-type) {
					margin-right: 2%;
				}
			}
			.Policy_table {
				width: 100%;
				padding: 0 30px;
				.Policy_table_top {
					width: 100%;
					height: 36px;
					display: flex;
					justify-content: flex-start;
					align-items: center;
					border-top: 1px solid #E8E8E8;
					font-size: 13px;
					color: #333333;
					p {
						margin: 0;
						height: 100%;
						border-right: 1px solid #E8E8E8;
						display: flex;
						align-items: center;
						text-indent: 20px;
					}
					.Policy_table_one {
						width: 33%;
					}
					.Policy_table_two {
						width: 24%;
					}
					.Policy_table_twos {
						display: flex;
						justify-content: flex-end;
						padding-right: 20px;
					}
					.Policy_table_three {
						width: 25%;
					}
					.Policy_table_four {
						width: 18%;
						border-right: 0;
					}
				}
				.Policy_table_top:last-child {
					border-bottom: 1px solid #E8E8E8;
				}
				.Policy_table_tops {
					background: #FAEADA;
					border-top: 1px solid #E8E8E8!important;
					border-bottom: 1px solid #E8E8E8;
					p {
						border-right: 0;
					}
				}
			}
		}
		.Policy_arr:not(:last-of-type) {
			margin-bottom: 5px;
			box-shadow: 0 !important;
			border-radius: 0;
			border-bottom: 0;
		}
	}
	
	.content_right {
		width: 110px;
		position: fixed;
		right: 30px;
		top: 21%;
		border-left: 1px solid #CBCBCB;
		box-sizing: border-box;
		padding: 20px 0;
		ul {
			width: 100%;
			margin: 0;
			padding: 0;
			li {
				width: 165px;
				margin-left: -15px;
				height: 20px;
				font-size: 13px;
				list-style: none;
				position: relative;
				color: #666666;
				display: flex;
				align-items: center;
				margin-bottom: 22px;
				cursor: pointer;
				background: url(../../assets/images/item2.png) no-repeat 6px center;
				background-size: 10%;
				span {
					margin-left: 41px;
				}
			}
			li:last-child {
				margin-bottom: 0;
			}
			li:hover {
				color: #F6AF7F;
				background: url(../../assets/images/item3.png) no-repeat 6px center;
				background-size: 10%;
			}
			.actives:hover {
				color: #FF7819;
				background: url(../../assets/images/item1.png) no-repeat 6px center;
				background-size: 10%;
			}
			.actives {
				color: #FF7819;
				background: url(../../assets/images/item1.png) no-repeat 6px center;
				background-size: 10%;
			}
		}
	}
	
	.Policy_extends {
		padding: 0!important;
		border: 0!important;
	}
	
	.extends {
		width: 100%;
		display: flex;
		justify-content: flex-start;
		flex-wrap: wrap;
		.extends_one {
			width: 50%;
			height: 47px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 1px solid #E8E8E8;
			border-right: 1px solid #E8E8E8;
			.Policy_extends_one {
				
				text-indent: 30px;
			}
			.Policy_table_two {
				margin-right: 26px;
			}
		}
	}
	
	.Service {
		width: 100%;
		padding: 30px 30px 0 30px;
		.Serviceinof {
			width: 100%;
			border: 1px solid #E8E8E8;
			.Service_top {
				width: 100%;
				height: 36px;
				display: flex;
				justify-content: flex-start;
				align-items: center;
				background: #FAEADA;
				font-size: 13px;
				color: #333333;
				border-bottom: 1px solid #E8E8E8;
				p {
					text-indent: 20px;
				}
				.Service_top_one {
					width: 18.5%;
				}
				.Service_top_two {
					width: 9%;
				}
				.Service_top_three {
					width: 10.5%;
				}
				.Service_top_four {
					width: 26.5%;
				}
				.Service_top_five {
					width: 35.5%;
				}
				.Settlement_top_one {
					width: 33%;
					text-indent: 20px;
				}
				.Settlement_top_two {
					width: 19%;
				}
				.Settlement_top_three {
					width: 20%;
				}
				.Settlement_top_four {
					width: 18%;
				}
				.Settlement_top_five {
					width: 9%;
					margin-right: 10px;
				}
			}
			.Service_content {
				width: 100%;
				.Service_content_name {
					font-size: 13px;
					height: 37px;
					line-height: 37px;
					color: #0F62C2;
					text-indent: 20px;
				}
				.Service_information {
					width: 100%;
					display: flex;
					
					height: auto;
					
					border-bottom: 1px solid #E8E8E8;
					font-size: 13px;
					p {
						min-height:36px;
						border-right: 1px solid #E8E8E8;
						
						margin:0;
						padding:0;
						span{
							display:flex;
							align-items: center;
							width:100%;
							height:100%;
							padding:0 20px;
							line-height:25px;
						}
					}
					.Service_top_one {
						width: 18.5%;
						
					}
					.Service_top_two {
						width: 9%;
					}
					.Service_top_three {
						width: 10.5%;
					}
					.Service_top_four {
						width: 26.5%;
						color: #027DCA;
						span{
							cursor: pointer;
						}
					}
					.Service_top_five {
						border-right: 0;
						width: 35.5%;
						color: #027DCA;
						span{
							cursor: pointer;
						}
					}
					.Settlement_top_one {
						border-right: 0;
						width: 33%;
						text-indent: 20px;
					}
					.Settlement_top_two {
						border-right: 0;
						width: 19%;
					}
					.Settlement_top_three {
						border-right: 0;
						width: 20%;
					}
					.Settlement_top_four {
						border-right: 0;
						width: 19%;
					}
					.Settlement_top_five {
						border-right: 0;
						width: 9%;
					}
				}
				.Service_content_name+.Service_information {
					border-top: 1px solid #E8E8E8;
				}
			}
		}
	}
	
	.nodata {
		width: 100%;
		padding: 20px 0;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	
	.Settlement {
		width: 100%;
		padding: 0 30px;
		.Settlement_top {
			width: 100%;
			height: 30px;
			background: #D9D9D9;
			border-radius: 3px;
			display: flex;
			justify-content: flex-start;
			align-items: center;
			.Settlement_top_one {
				width: 33%;
				text-indent: 20px;
			}
			.Settlement_top_two {
				width: 19%;
			}
			.Settlement_top_three {
				width: 20%;
			}
			.Settlement_top_four {
				width: 19%;
			}
			.Settlement_top_five {
				width: 9%;
			}
		}
		.Settlement_content {
			width: 100%;
			display: flex;
			justify-content: flex-start;
			.Settlement_top_one {
				width: 33%;
				text-indent: 20px;
			}
			.Settlement_top_two {
				width: 19%;
			}
			.Settlement_top_three {
				width: 20%;
			}
			.Settlement_top_four {
				width: 19%;
			}
			.Settlement_top_five {
				width: 9%;
			}
		}
	}
	
	.remarks {
		width: 100%;
		padding: 0 20px;
		.remarks_content {
			margin-left: 10px;
			position: relative;
			.remarks_line {
				position: absolute;
				width: 1px;
				height: 100%;
				top: 0;
				left: 0;
				margin: 0;
				padding: 0;
				padding: 15px 0;
				span {
					display: block;
					width: 1px;
					height: 100%;
					background: #CBCBCB;
				}
			}
			.remarks_text {
				margin: 0;
				padding: 0;
				min-height: 30px;
				line-height: 30px;
				font-size: 13px;
				color: #666666;
				position: relative;
				.queyua {
					display: block;
					position: absolute;
					top: 12px;
					left: -2px;
					width: 6px;
					height: 6px;
					border-radius: 50%;
					background: #FFFFFF;
					border: 1px solid #7BB9E0;
				}
				.zhehan {
					display: block;
					width: 100%;
					min-height: 30px;
					word-break: break-all;
					padding-left: 18px;
				}
			}
		}
	}
	
	.Policycar .Policy_conebt_name {
		width: 80px !important;
	}
	
	.backjian {
		width: 100%;
		height: 6px;
		background: #f1f1f1;
	}
	
	.scrollcontent {
		position: relative;
	}
	
	.addremarks {
		position: absolute;
		width: calc( 100% - 127px);
		top: 0;
		height: 20px;
		left: 130px;
		font-size: 13px;
		color: #027DCA;
		top: 32px;
		display: flex;
		align-items: center;
		cursor: pointer;
	}
	
	.scrollcontent_padtops {
		padding-top: 30px !important;
	}
	
	.setStyle {
		margin-top: 20px;
	}
	
	.buttons {
		padding: 7px 15px;
	}
	
	.padlefts {
		width: 191px;
	}
	
	.Policy_conebt_bom:not(:last-of-type) {
		padding-bottom: 30px !important;
	}
	
	.Policy_boms {
		padding-top: 30px!important;
	}
	
	.Policy_details_name {
		border-bottom: 1px solid #E8E8E8;
		border-top: 1px solid #E8E8E8;
		font-size: 13px;
		color: #0F62C2;
		display: block;
		width: 100%;
		height: 37px;
		line-height: 37px;
		text-indent: 18.5px;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		.icon-xuanzhong {
			color: #FF7819;
			font-size: 9px;
			margin-right: 5px;
		}
	}
	
	.Policy_table_bor {
		border-left: 1px solid #E8E8E8;
		border-right: 1px solid #E8E8E8;
	}
	
	.icon-bianji {
		font-size: 12px;
		
		    color: #0F62C2;
		cursor: pointer;
	}
	
	.btns {
		width: 100%;
		height: 28px;
		display: flex;
		justify-content: flex-end;
		align-items: center;
		margin-top: 20px;
		button {
			padding: 7px 15px;
		}
		button:first-child {
			background: #FF7819;
			color: #FFFFFF;
		}
	}
	
	.insurance_radio {
		width: 100%;
		font-size: 13px;
		display: flex;
		justify-content: space-between;
	}
	
	.insurance_radios {
		margin-right: 15px;
		width: 60px;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		.radio_lefdt {
			margin-left: 0;
		}
		.radio_lefdt:not(:first-of-type) {
			margin-top: 10px;
		}
	}
	
	.remark_title {
		width: 100%;
		height: 21px;
		line-height: 21px;
		text-align: center;
		margin: 14px 0 34px 0;
		position: relative;
		.icon-close {
			position: absolute;
			font-size: 13px;
			right: 0;
			top: 3px;
			cursor: pointer;
		}
	}
	
	.el-textarea__inner {
		background: #F0F0F0!important;
	}
	
	.remark_chose {
		margin-top: 20px;
	}
	
	.color_text {
		display:block;
		height:100%;
		color: #333;
		width: 100%;
		.color_texts{
			display:inline-block;
			
			word-break: break-all;
		}
	}
	
	.jiange {
		width: 1005;
		height: 10px;
		background: #F1F1F1;
	}
	
	.adddivs {
		width: 100%;
		height: 100vh;
		background: white;
	}
	.Service_top_cursor{
		span{
			cursor:pointer;
		}
		
	}
	.compony_text{
		overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
	}
</style>